import java.util.Scanner;

public class homework39 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入一个正整数：");
        String[] m={"零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };//定义中文格式的数字
        while (true){
            String str =sc.nextLine();
            for (int i = 0; i <str.length() ; i++) { // 先提取键盘输入字符串中的每个字符，再转换成阿拉伯数字
                int a =str.charAt(i)-'0'; //对a进行判断
                if (a >= 0 && a < 10) {
                    System.out.print(m[a]);
                } else {
                    System.out.println("请重新输入数字：" + "\n");
                    break;//跳出循环
                }
            }
            System.out.println("\n");
        }
    }
}
